You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(images): add download to image preview - #490
Add Download beside the full-screen image preview controls.
Use the full-resolution image source, retaining host/session URL ownership and supporting inline and Blob images.
Reuse the translated Download label and toolbar styling. External images may open in a separate tab under browser cross-origin restrictions.
Verification
bun test --parallel components/ImageLightbox.test.mjs: 12 passed.
Targeted ESLint and tsc --noEmit: passed.
Temporary DOM interaction smoke: full-resolution, inline, Blob, retained URL ownership, keyboard focus and viewer lifetime passed; fixture removed.
Condensed adversarial review: no blockers.
Real browser launch attempted with Chromium and own-engine fallback; both blocked by unavailable browser daemon. Actual file download and visual layout remain unverified.
Summary by CodeRabbit
New Features
Added an option to download the original image from the full-screen viewer. If the image can’t be downloaded directly, it opens in a new tab.
No actionable comments were generated in the recent review.
Walkthrough
The full-screen image viewer adds a download link for the displayed image source. The link opens in a new tab and uses noopener noreferrer. The changelog describes the download action and the cross-origin fallback.
Changes: Image download
Layer / File(s)
Summary
Add the lightbox download action components/ImageLightbox.tsx, CHANGELOG.md
ImageLightbox accepts src as a string and renders a download link with a Download icon. The changelog documents the action and notes that external images may open in a new tab when cross-origin restrictions prevent downloading.
This adds a Download link to the full-screen image preview, using the existing translated label. No concrete problems were found, so the change looks ready to merge. Real browser download behavior has not been exercised.
Security architecture risk: Minimal · up to 7ccf4
The action reuses the displayed image URL and isolates any newly opened tab. The inspected change does not establish a material weakening of security, failure containment, or URL ownership.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The newly exposed operation is activation of a message- or markdown-derived image URL in the viewer user's browser, resulting in a download or navigation. The inspected change adds no backend endpoint, host/session selector, or server-side fetch authority.
Trust Boundaries and Controls
observed — The URL now reaches an anchor rather than only an image-rendering sink. The anchor explicitly requests opener and referrer isolation with noopener noreferrer. Existing dialog event handling stops clicks from bubbling into surrounding React link handlers; neither mechanism validates the destination URL.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "feat(images): add download to image preview" matches the main change. The PR adds a Download control to the full-screen image preview (ImageLightbox), and the changelog and file summaries d…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat(images): add download to image preview" matches the main change. The PR adds a Download control to the full-screen image preview (ImageLightbox), and the changelog and file summaries describe that same feature. The title is short, specific, and follows the conventional commit style. It does not cover the cross-origin fallback to a new tab, but that is a detail and does not need to be in the title.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: b69c03e7-1391-4b16-be5c-79c95bd269a6
Commits
Reviewing files that changed from the base of the PR and between cd88954 and 7ccf49d.
Files selected for processing: 2
CHANGELOG.md
components/ImageLightbox.tsx
Limit details: You’ve used all 10 included reviews currently available.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
bun test --parallel components/ImageLightbox.test.mjs: 12 passed.tsc --noEmit: passed.Summary by CodeRabbit